:root {
  --white-10: rgba(255, 255, 255, 0.1);
  --white-20: rgba(255, 255, 255, 0.2);
  --white-30: rgba(255, 255, 255, 0.3);
  --white-50: rgba(255, 255, 255, 0.5);
  --white-15: rgba(255, 255, 255, 0.15);
  --gap-sm: 8px;
  --gap-md: 16px;
  --gap-lg: 24px;
  --radius-md: 8px;
  --transition: all 0.3s ease;
}

/* ==================== 搜索框样式 ==================== */
.search-container {
  margin: var(--gap-lg) auto;
  width: 100%;
  max-width: 600px;
  display: flex;
  justify-content: center;
  position: relative;
}

.search-box {
  width: 100%;
  position: relative;
}

#search-input {
  width: 100%;
  height: 48px;
  padding: 0 48px 0 var(--gap-md);
  background: var(--white-10);
  backdrop-filter: blur(10px);
  border: 1px solid var(--white-20);
  border-radius: 24px;
  color: white;
  font-size: 16px;
  outline: none;
  transition: var(--transition);
  box-sizing: border-box;
}

#search-input:focus {
  border-color: var(--white-50);
  background: var(--white-15);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

#search-input::placeholder {
  color: var(--white-50);
}

.search-btn {
  position: absolute;
  right: 1px;
  top: 1px;
  height: 46px;
  padding: 0 16px;
  background: transparent;
  border: none;
  border-radius: 0 23px 23px 0;
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-btn:hover {
  background: var(--white-15);
  transform: scale(1.05);
}

.search-btn svg {
  width: 20px;
  height: 20px;
}

/* ==================== 搜索结果样式 ==================== */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: var(--gap-sm);
  width: 100%;
  max-height: 400px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--white-20);
  border-radius: var(--radius-md);
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.search-results.show {
  display: block;
}

.search-result-item {
  padding: var(--gap-md);
  border-bottom: 1px solid var(--white-10);
  cursor: pointer;
  transition: var(--transition);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--white-10);
}

.search-result-item a {
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--gap-md);
}

.search-result-item img {
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

.search-result-item h3 {
  margin: 0 0 var(--gap-sm) 0;
  font-size: 16px;
  font-weight: 500;
  text-align: left;
}

.search-result-item p {
  margin: 0;
  color: var(--white-50);
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}

.search-no-results {
  padding: var(--gap-lg);
  text-align: center;
  color: var(--white-50);
}

/* ==================== 滚动条样式 ==================== */
.search-results::-webkit-scrollbar {
  width: 6px;
}

.search-results::-webkit-scrollbar-track {
  background: var(--white-10);
  border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb {
  background: var(--white-30);
  border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb:hover {
  background: var(--white-50);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
  .search-container {
    margin: var(--gap-md) 16px;
    width: calc(100% - 32px);
  }
  
  #search-input {
    height: 44px;
    font-size: 14px;
  }
  
  .search-btn {
    height: 42px;
  }
}